package com.vitalfit.client;

import com.vitalfit.model.entity.user.Customer;
import com.vitalfit.model.entity.user.Trainer;
import com.vitalfit.model.vo.UserVO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

@FeignClient(name = "user-service")
public interface UserServiceClient {

    @GetMapping("/api/v1/user/customer/{userId}")
    Customer getCustomerById(@RequestHeader("Authorization") String authorizationHeader, @PathVariable("userId") Integer userId);

    @GetMapping("/api/v1/user/trainer/{trainerId}")
    Trainer getTrainerById(@RequestHeader("Authorization") String authorizationHeader, @PathVariable("trainerId") Integer trainerId);


    @PostMapping(value = "/api/v1/user/trainer", consumes = "application/json")
    Trainer getTrainerByEmail(@RequestHeader("Authorization") String authorizationHeader, @RequestBody String trainerEmail);

    @GetMapping("/api/v1/user/{userId}")
    UserVO getUserById(@RequestHeader("Authorization") String authorizationHeader, @PathVariable("userId") Integer userId);



}

